package com.joysuch.wwyt.log.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.joysuch.wwyt.core.common.ajax.ResultBean;
import com.joysuch.wwyt.log.bean.LogPageSearchBean;
import com.joysuch.wwyt.log.entity.FileUploadLog;
import com.joysuch.wwyt.log.service.FileUploadLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zr
 * @since 2021-07-14
 */
@RestController
@RequestMapping("/log/file-upload-log")
@Api(tags = "文件日志")
public class FileUploadLogController {

    @Autowired
    private FileUploadLogService fileUploadLogService;

    @PostMapping("/selectPage")
    @ApiOperation(value = "分页查询日志")
    public ResultBean selectPage(@RequestBody LogPageSearchBean logPageSearchBean){
        IPage<FileUploadLog> fileUploadLogIPage = fileUploadLogService.selectPage(logPageSearchBean);
        return ResultBean.pageData(fileUploadLogIPage.getRecords(),fileUploadLogIPage.getTotal());
    }

}

